import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import User from '../views/user/User.vue'
import Role from '../views/power/Role.vue'
import Power from '../views/power/Power.vue'
import Goods from '../views/goods/Goods.vue'
import Categories from '../views/goods/Categories.vue'
import Params from '../views/goods/Params.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/login',
    name: 'default',
    component: Login
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [{
      path: 'users',
      name: 'User',
      component: User
    },
    {
      path: 'roles',
      name: 'Role',
      component: Role
    },
    {
      path: 'rights',
      name: 'Power',
      component: Power
    },
    {
      path: 'categories',
      name: 'Categories',
      component: Categories
    },
    {
      path: 'params',
      name: 'Params',
      component: Params
    },
    {
      path: '/goods',
      name: 'Goods',
      component: Goods
    }
    ]
  }]
})
